# pip install moviepy
from moviepy.editor import VideoFileClip

# 从视频中分离出语音
video_path = 'data/test.mp4'
audio_path = 'data/test_voice.mp3'

video_clip = VideoFileClip(video_path)
audio_clip = video_clip.audio
audio_clip.write_audiofile(audio_path)

audio_clip.close()
video_clip.close()
